package com.kun.gulimall.member.controller;

import com.kun.gulimall.member.feign.CouponFeign;
import com.kun.gulimall.member.service.GrowthChangeHistoryService;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RequestMapping("/member/growth-change-history")
@RestController
@AllArgsConstructor
public class GrowthChangeHistoryController {

    private final GrowthChangeHistoryService growthChangeHistoryService;
    private final CouponFeign couponFeign;

    @GetMapping("/list")
    public ResponseEntity<Object> list(Map<String, Object> params) {
        return ResponseEntity.ok(growthChangeHistoryService.queryPage(params));
    }

    @GetMapping("/save")
    public ResponseEntity<Object> save() {
        return ResponseEntity.ok(couponFeign.list(null));
    }

}
